package vip.ifmm.lehouse.common.enums.status;

import vip.ifmm.lehouse.common.enums.Statable;

/**
 * 用户服务响应状态码
 *
 * @author Fish
 * <p>Email: fishinlove@163.com</p>
 * <p>created by 2019/06/16 20:23:09</p>
 */
public enum UserRegisterStatus implements Statable {

    SUCCESS(Statable.SUCCESS_CODE, "恭喜您，注册成功！"),
    REGISTER_CODE_SENT(Statable.SUCCESS_CODE, "注册验证码发送成功！"),
    EMAIL_IS_OK(Statable.SUCCESS_CODE, "恭喜您，邮件可以使用！"),
    FAILED(-1, "注册失败，请稍后重试！"),
    EMAIL_IS_EMPTY(-100, "请检查邮箱是否为空！"),
    EMAIL_IS_USED(-102, "邮箱已经被使用！"),
    PASSWORD_IS_EMPTY(-200, "请检查密码是否为空！"),
    REGISTER_CODE_IS_INCORRECT(-300, "请检查验证码是否正确！");

    private int code;
    private String msg;

    UserRegisterStatus(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }
}
